import requests

from com.yh.oa.api.user import User


class TestParent:
    # 创建会话
    @classmethod
    def setup_class(cls):
        # 构建cookie环境
        cls.session = requests.Session()
        # 构建登陆环境 获取token
        user =User()
        result = user.login("admin","admin123")
        tokens = result.json()["data"]["token"]
        cls.token = {"authorization":"Bearer "+tokens}